package com.github.wj.web.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018/3/16
 */
@Entity
public class Lborganization {
    private Long id;
    private Long fid;
    private Long grade;
    private Long type;
    private Long orgtype;
    private String orgcode;
    private String name;
    private String fdncode;

    @Id
    @Column(name = "ID")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "FID")
    public Long getFid() {
        return fid;
    }

    public void setFid(Long fid) {
        this.fid = fid;
    }

    @Basic
    @Column(name = "GRADE")
    public Long getGrade() {
        return grade;
    }

    public void setGrade(Long grade) {
        this.grade = grade;
    }

    @Basic
    @Column(name = "TYPE")
    public Long getType() {
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }

    @Basic
    @Column(name = "ORGTYPE")
    public Long getOrgtype() {
        return orgtype;
    }

    public void setOrgtype(Long orgtype) {
        this.orgtype = orgtype;
    }

    @Basic
    @Column(name = "ORGCODE")
    public String getOrgcode() {
        return orgcode;
    }

    public void setOrgcode(String orgcode) {
        this.orgcode = orgcode;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "FDNCODE")
    public String getFdncode() {
        return fdncode;
    }

    public void setFdncode(String fdncode) {
        this.fdncode = fdncode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Lborganization that = (Lborganization) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(fid, that.fid) &&
                Objects.equals(grade, that.grade) &&
                Objects.equals(type, that.type) &&
                Objects.equals(orgtype, that.orgtype) &&
                Objects.equals(orgcode, that.orgcode) &&
                Objects.equals(name, that.name) &&
                Objects.equals(fdncode, that.fdncode);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, fid, grade, type, orgtype, orgcode, name, fdncode);
    }
}
